<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 所有函数自带一个属性 prototype => 显示原型对象 */
        function Person(name,age){
            this.name = name;
            this.age = age;

            this.eat = function(){
                console.log("吃!!!");
            }
        }
        let p1 = new Person("郑香",18);

        function Student(){

        }

        // 构造函数的prototype
        console.log(Person.prototype === Student.prototype);


    </script>
</body>
</html>